import request from '/@/utils/request.ts';

export function get${tableName}List(params: object) {
    return request({
        url: '${urlPre}/${tableName1}/page',
        method: 'get',
        params
    })
}

export function add${tableName}(data: object) {
    return request({
        url: '${urlPre}/${tableName1}/',
        method: 'POST',
        data: data
    })
}

export function get${tableName}Info(${pkField}: any) {
    return request({
        url: `${urlPre}/${tableName1}/\$\{${pkField}}`,
        method: 'GET'
    })
}

export function edit${tableName}(data: object, ${pkField}: any) {
    return request({
        url: `${urlPre}/${tableName1}/\$\{${pkField}}`,
        method: 'PUT',
        data: data
    })
}

export function del${tableName}(${pkField}: any) {
    return request({
        url: `${urlPre}/${tableName1}/\$\{${pkField}}`,
        method: 'DELETE'
    })
}